<link rel="stylesheet" type="text/css" href="<c:url value="/css/sistemas/nyroModal.css"/>" />
<script type="text/javascript" src="<c:url value='/js/nyroModal/js/jquery.nyroModal.js'/>"></script>
<script type="text/javascript" src="<c:url value='/js/nyroModal/js/jquery.nyroModal.filters.link.js'/>"></script>
<script type="text/javascript" src="<c:url value='/js/jQuery/jquery.form.js'/>"></script>
<script type="text/javascript" src="<c:url value='/js/jshash-2.2/sha1-min.js'/>"></script>	

<script type="text/javascript">
	
	var codificar = false;
	$(document).ready(function() {
		
		var optionsPopUp = {
			closeOnEscape : true,
			closeOnClick : false,
			showCloseButton : false,
			sizes : {
				initW : '100', // Initial width
				initH : '100' // Initial height				   			    				    	    
			}
		};

		$('#botonCambiarClave')
			.click(function(e) {
				e.preventDefault();
				$.nmManual("<c:url value='/privado/formCambiarClave.do?idUsuario=${usuario.id}'/>", optionsPopUp);
		});
		
	});

	function guardar() {
		
		if (codificar) {
			if($('#pass').html() != null && $('#repetirPass').html() != null){
				if($('#pass').val() != "" && $('#repetirPass').val() != ""){
					$('#pass').val(hex_sha1($('#pass').val()));
					$('#repetirPass').val(hex_sha1($('#repetirPass').val()));
				}
			}else if($('#ocultoPassword').html() != null && $('#ocultorepeatPassword').html() != null){
				$('#ocultorepeatPassword').val(hex_sha1($('#ocultorepeatPassword').val()));
				$('#ocultoPassword').val(hex_sha1($('#ocultoPassword').val()));
			}
		
		}
		$('#formUser').submit();
		
	}

</script>